Resourceful Lenses for Ordered Data

نویسندگان

  • Aaron Bohannon
  • J. Nathan Foster
  • Benjamin C. Pierce
  • Alan Schmitt
چکیده

A lens is a bi-directional program. When read from left to right, it denotes an ordinary function. When read from right to left, it denotes an “update translator” that takes an input to this function together with an updated output and produces a new input reflecting the update. Several variants of the idea of lenses have been explored. But none of them deal fully with ordered data. If an update involves a change in the order of a list (for example) in the output, the correspondence between the items in the output list and the items in the input list can be lost, leading to loss or corruption of data. We propose a refined semantic space of resourceful lenses, enriching the well-behaved lenses of Foster, Greenwald, Moore, Pierce, and Schmitt (2007) with an equivalence relation embodying a notion of “reordering,” with respect to which the translation of updates must be invariant. We then present a regular-expressionlike syntax for building resourceful lenses over string data. The key technical challenge is devising an intermediate semantic space that supports global matching of corresponding chunks of input and outputs structures while providing suitable denotations for a compositional language of lens combinators with local static checks guaranteeing that the semantic laws are satisfied. We give examples showing how our language can be used to build realworld string transformations.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Scleral lenses in the management of keratoconus.

PURPOSE To describe the use of Jupiter scleral lenses (Medlens Innovations, Front Royal, VA; and Essilor Contact Lenses, Inc., Dallas, TX) in the management of keratoconus. METHODS We performed a single-center retrospective chart review of our initial 32 patients with keratoconus evaluated for scleral lens wear. All patients were referred for scleral lens evaluation after exhausting other non...

متن کامل

Designing the optimal Fresnel lenses by using Zemax software

In this paper, the optimal Fresnel lenses are designed by Zemax software.The fundamental problem of the Fresnel lenses is the beam divergence, which wasresolved by decreeing the output stain diameter on the image plane. For this purpose,two types of radial and cylindrical Fresnel lenses are simulated with different groovesusing Global and Hammer optimization methods. The minimum output stain di...

متن کامل

میزان استفاده و آگاهی دانش‌آموزان دبیرستان‌های دخترانه‌ی شهر زنجان از لنزهای طبی‌ _ رنگی در سال تحصیلی 1382

Background & objective: The aim of this study was to investigate the knowledge and use of contact lenses by high school female students in Zanjan in 2003. Materials & Methods: The designed questionnaire was randomly distributed among the high school female students. Then the questionnaire’s questions were standardized based on the study. The main sample size was 700. The samples were selected o...

متن کامل

Light microscopic variation of fiber cell size, shape and ordering in the equatorial plane of bovine and human lenses.

PURPOSE A rapid means was sought to visualize and quantify the cross-sectional areas of fiber cells, the variations of cell area, and the regularity of packing in the equatorial plane of normal adult bovine and normal aged human lenses. METHODS Vibratome sections of bovine and human lenses were fixed, embedded in LR White resin, and sectioned for light microscopic observation. Image analysis ...

متن کامل

Investigation of Liquefaction Mechanism in Double Sand Lenses

In many cases of heavy earthquakes, liquefaction has resulted in serious damages. Existing anisotropy in soil layers results  in some difficulties to realize the reason for these phenomena. Loose sand lenses buried in fine soils are one of the cases which may result in these problems and as a weak point during the earthquake can cause this phenomenon. In this paper, using FLAC 2D software, doub...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2007